package com.zcx.mall.common.web.exception;

import com.zcx.mall.common.web.constants.ErrorCodeConstants;
import lombok.Data;

@Data
public class BizExcepton extends RuntimeException {

    private String errorCode;

    private String message;

    public BizExcepton() {

    }

    public BizExcepton(ErrorCodeConstants errorCodeConstants) {
        this.errorCode = errorCodeConstants.getErrorCode();
        this.message = errorCodeConstants.getMessage();
    }

    public BizExcepton(String message) {
        this.errorCode = "9999";
        this.message = message;
    }
}
